package com.whynot.frame.ms.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.whynot.frame.basic.mybatis.conroller.model.PageData;
import com.whynot.frame.ms.entities.SysMenu;
import com.whynot.frame.ms.entities.SysRole;
import com.whynot.frame.ms.entities.SysUser;
import com.baomidou.mybatisplus.mapper.BaseMapper;

import java.util.List;
import java.util.Map;

/**
 * 描    述:数据库层：用户接口
 * 创建时间: 2018/06/20
 */
public interface UserMapper extends BaseMapper<SysUser>{
    SysUser login(SysUser sysUser) throws Exception;

    Map<String,Object> getUser(SysUser sysUser) throws Exception;

    Boolean updatePwd(String userName,String newPwd);

    List<SysRole> findRolesByUser(String id);

    List<SysMenu> findPermissionsByUser(String id);

    int insertUserRole(List<Map> list);

    int deleteByUR(Map map);

    int deleteByUserId(String userId);

    int deleteByRoleId(String roleId);
}